﻿using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

namespace Core.DataAccess.Model
{
    public static class iToolLoggerExtensions
    {
        public static IServiceCollection UseiToolLogger(this IServiceCollection services)
        {
            services.AddSingleton<iToolLoggerSaveProvider>();
            services.AddSingleton<iToolLogFunctionSaveProvider>();
            services.AddSingleton<ILogger, iToolLogger>();
            services.AddSingleton(typeof(ILogger<>), typeof(iToolLoggerCategory<>));
            return services;
        }
    }
}
